<template>
  <view>
   <u-sticky bgColor="#fff">
      <u-tabs :list="tablist" @click="click" lineColor="#f25c4d" itemStyle="padding:0 65px;height:45px" >
      </u-tabs>
    </u-sticky>
 <!-- <message-page :list="list"></message-page> -->
 <view class="top">
    <image src="../../static/icon_yidu@2x.png" mode=""></image>
    <text>全部已读</text>
  </view>
  <view class="messgae-box">
    <view class="task">您有新的运输任务</view>
    <view class="conten-box">
      <view class="path">路径---------------</view>
      <view class="timer-box">
        <view class="time">2202.2221.2121</view>
        <view class="btn">查看详情</view>
      </view>
    </view>
  </view>
  </view>
</template>

<script>
  export default {
    name: '',
    components: {},
    data() {
      return {
        tablist: [{
          name: '公告',
          badge: {
            isDot: true
          }
        }, {
          name: '任务通知',
        }],
        extraIcon:{color: '#f25c4d',size:'10',type: 'smallcircle-filled'},
        list:[]
      }

    },
    created() {
      this.getList()
    },
    mounted() {},
    onLoad() {},
    methods: {
      click(e) {
        console.log(e)
      
      },
     async  getList(){
        const res = await  uni.$http.get('/messages/page',{
          contentType:201,
          page:1,
          pageSize:20
        })
        // console.log(res)
        this.list = res.data.data.items
      }
    }
  }
</script>

<style lang="scss">
 ::v-deep .uni-list-item__container{
   box-sizing: content-box;
    height: 60px;
    padding: 0 12px 0 12px;
    border-bottom: 2px solid #fefefe;
  }
  .top{
    display: flex;
    align-items: center;
    padding: 20px 20px 0 20px;
    margin-bottom: 20px;
    image{
      width: 15px;
      height: 15px;
    }
    text{
      font-family: PingFangSC-Regular;
      font-weight: 400;
      font-size: 14px;
      color: #818181;
      letter-spacing: 0.16px;
      margin-left: 5px;
    }
  }
  .messgae-box{
    display: flex;
    flex-direction: column;
    width: 348px;
    height: 151px;
    margin: 0 auto;
    padding: 16px;
    background-color: #ffffff;
  .task{
    height: 20px;
    margin-bottom: 12px;
  }
  .conten-box{
    flex: 1;
    border-top: 4px solid #fefefe;
    .timer-box{
      display: flex;
      justify-content: space-around;
    }
  }
}
</style>